import http from './utils/http'

export function useGetDictTypeApi(): Promise<any> {
  return http.get('/dict/orderType')
}

export function useSubmitApplicationApi(data: any): Promise<any> {
	 return http.post('/projectApply/filed', data)
}


export function useGetOrderApplyInfoApi(id: string): Promise<any> {
	return http.get('/projectApply/info/' + id)
}
export function useDeleteOrderApplyApi(id: string): Promise<any> {
	return http.delete('/projectApply/' + id)
}
export function useGetIndexTaskApi(data: any): Promise<any> {
	return http.get('/task/page', {
		params: data
	})
}
export function useGetOrderRecordApi(data: any): Promise<any> {
	return http.get('/task/page', {
		params: data
	})
}
export function useGetIndexOrderInfoApi(id: string): Promise<any> {
	return http.get('/task/info/' + id)
}

export function useStartTaskApi(id: string): Promise<any> {
	return http.post("/task/start-task/" + id)
}

export function useEndTaskApi(id: string): Promise<any> {
	return http.post("/task/end-task/" + id)
}

export function useInspectionApi(data: any): Promise<any> {
	return http.post("/bill-check", data)
}

export function useWayBillListApi(id): Promise<any> {
	return http.get("/waybill/list?taskId=" + id)
}

export function useWayBillInfoApi(id): Promise<any> {
	return http.get("/waybill/info/" + id)
}

export function useWayBillAppealApi(data: any): Promise<any> {
	return http.post("/task-complaint", data)
}

export function useCancelTaskApi(data: any): Promise<any> {
	return http.post("/task/cancel-task/"+ data)
}